#include "startupwindow.h"

SplashScreen::SplashScreen(const QPixmap& pixmap) : QSplashScreen(pixmap) {
    setPixmap(pixmap.scaled(600, 400, Qt::KeepAspectRatio, Qt::SmoothTransformation));
    show();
}

void SplashScreen::start(int ms) {
    m_timer = new QTimer(this);
    connect(m_timer, &QTimer::timeout, this, [=]() {
        m_timer->stop();
        emit finished();
    });
    m_timer->start(ms);
}
